package cn.kduck.assembler.security.authentication;

import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;

public class PhoneNumAuthenticationToken extends UsernamePasswordAuthenticationToken {

    public static final String ACCOUNT_PREFIX = "PHONE_LOGIN::";

    private String captchaCode;

    public PhoneNumAuthenticationToken(Object principal, Object credentials) {
        super(ACCOUNT_PREFIX + principal,credentials);
    }

    public PhoneNumAuthenticationToken(Object principal, Object credentials, Collection<? extends GrantedAuthority> authorities) {
        super(ACCOUNT_PREFIX + principal,credentials,authorities);
    }

    public String getCaptchaCode() {
        return captchaCode;
    }

    public void setCaptchaCode(String captchaCode) {
        this.captchaCode = captchaCode;
    }
}
